[build] avoid use generator expression to add linker parameter#29636
[build] avoid use generator expression to add linker parameter#29636edymtt merged 2 commits intoswiftlang:masterfrom
Conversation
Generator expressions seem not to allow the `LINKER:` prefix to be expanded correctly when used in `target_link_options`. To solve this, undo the change from swiftlang#29451 and instead use an `if` statement to add the flag when needed. Addresses rdar://problem/59117166
|
@swift-ci please test |
|
@swift-ci please test Windows platform |
|
Build failed |
|
The failure on Swift Test OS X Platform looks related to machine configuration |
|
@swift-ci please test macOS |
|
@swift-ci please smoke-test |
|
@swift-ci please smoke test |
|
It is supported, but I think that it could be a limitation of 3.15. Could you please update the comment or better yet, add it as: |
|
@swift-ci please test |
|
@swift-ci please smoke test |
|
@swift-ci please test Windows platform |
|
Build failed |
|
Committed e438ce7 with the proposal -- we will introduce a bit of code duplication, but (a) both code paths are next to each other and (b) we will not forget about the opportunity to make this code more streamlined |
|
Build failed |
|
@swift-ci please test Windows platform |
compnerd
left a comment
There was a problem hiding this comment.
Would be nice to squash these before merging
After noticing that also in CMake 3.16 the LINKER: prefix is not expanded correctly when used in `target_link_options`, prefer to set the linker parameters in a more verbose way and leave a comment behind on when this behavior was observed in case we want to change the implementation later. Follow up to swiftlang#29636. Addresses rdar://problem/59732421
After noticing that also in CMake 3.16 the LINKER: prefix is not expanded correctly when used in `target_link_options`, prefer to set the linker parameters in a more verbose way and leave a comment behind on when this behavior was observed in case we want to change the implementation later. Follow up to #29636. Addresses rdar://problem/59732421
Generator expressions seem not to allow the
LINKER:prefix to beexpanded correctly when used in
target_link_options.To solve this, undo the change from #29451 and instead
use an
ifstatement to add the flag when needed.Addresses rdar://problem/59117166